// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package output

import "testing"

func TestCreateDomain(t *testing.T) {
	tests := []QueryParses{
		Converts("CREATE DOMAIN name data_type"),
		Converts("CREATE DOMAIN name AS data_type"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression"),
		Converts("CREATE DOMAIN name data_type NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NOT NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NOT NULL"),
		Converts("CREATE DOMAIN name data_type CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name data_type NULL"),
		Converts("CREATE DOMAIN name AS data_type NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NULL"),
		Converts("CREATE DOMAIN name data_type CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression )"),
		Converts("CREATE DOMAIN name data_type NOT NULL NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type NOT NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NOT NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NOT NULL NOT NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression NOT NULL NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression NOT NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NOT NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NOT NULL NOT NULL"),
		Converts("CREATE DOMAIN name data_type CONSTRAINT constraint_name NOT NULL NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NOT NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL NOT NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL NOT NULL"),
		Parses("CREATE DOMAIN name data_type CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) NOT NULL"),
		Converts("CREATE DOMAIN name data_type NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name data_type CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NOT NULL"),
		Parses("CREATE DOMAIN name data_type NOT NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type NOT NULL NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NOT NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NOT NULL NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression NOT NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression NOT NULL NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NOT NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NOT NULL NULL"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name NOT NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NOT NULL NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL NULL"),
		Converts("CREATE DOMAIN name data_type NULL NULL"),
		Converts("CREATE DOMAIN name AS data_type NULL NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NULL NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression NULL NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression NULL NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NULL NULL"),
		Converts("CREATE DOMAIN name data_type CONSTRAINT constraint_name NULL NULL"),
		Converts("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NULL NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NULL NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NULL NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NULL NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL NULL"),
		Parses("CREATE DOMAIN name data_type CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name AS data_type CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) NULL"),
		Parses("CREATE DOMAIN name data_type NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name data_type NULL CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name AS data_type NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NULL CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression NULL CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NULL CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name data_type CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NULL"),
		Converts("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name NULL"),
		Parses("CREATE DOMAIN name data_type NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NOT NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name NULL CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
		Parses("CREATE DOMAIN name AS data_type COLLATE en_US DEFAULT expression CONSTRAINT constraint_name CHECK ( expression ) CONSTRAINT constraint_name CHECK ( expression )"),
	}
	RunTests(t, tests)
}
